package cn.wsalix.sale.entity;

import javax.persistence.Entity;
import javax.persistence.Table;

import lombok.Data;
import lombok.EqualsAndHashCode;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import cn.anlaser.entity.CommonEntity;
import cn.wsalix.type.SaleRecordEnum;

/**
 * @author jskyme
 * 销售总量
 */
@Entity
@Table(name = "SALE_RECORD")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@DynamicUpdate
@DynamicInsert
@Data
@EqualsAndHashCode(callSuper = false)
public class SaleRecord extends CommonEntity {
	/**
	 * 
	 */
	private static final long serialVersionUID = -6133984070037311209L;

	private Long fkId;//产品ID/分类ID
	private SaleRecordEnum type;
	private Long saleCount;//销售数量
	private Long toRefund;//退货数量
}